package main

import "fmt"

type ValNode struct {
	row int
	col int
	val int
}

func main() {
	var chessMap [11][11]int
	chessMap[1][2] = 1
	chessMap[2][3] = 2
	for _, v := range chessMap {
		for _, j := range v {
			fmt.Print(j)
		}
		fmt.Println()
	}
	var sparseArry []ValNode
	for i, v := range chessMap {
		for j, v2 := range v {
			if v2 != 0 {
				valNode := ValNode{
					row: i,
					col: j,
					val: v2,
				}
				sparseArry = append(sparseArry, valNode)
			}
		}
	}
	for i, valNode := range sparseArry {
		fmt.Printf("%d: %d %d %d\n", i, valNode.row, valNode.col, valNode.val)
	}
}
